<?php
namespace Cyfy\Modules\FlickrCustomSetGallery\Forms;
use \Cyfy\Modules\Forms;
use \Cyfy\Modules\FlickrCustomSetGallery\Module;

class Settings extends Forms\Form
{
    function structure()
    {
        $this -> permission("FlickrCustomSetGallery", "administration");
        $this -> stay = true;

        
        $i = new Forms\TextBox("id", self :: t(10));
        $i -> required = true;
        $i -> description = self :: t(21, array("http://idgettr.com"));
        $this -> AddItem($i);
        
        $i = new Forms\TextBox("setsOnPage", self :: t(30));
        $i -> format = "number";
        $i -> maxvalue = 100;
        $i -> required = true;
        $this -> AddItem($i);

        $b = new Forms\Button(self :: t(40));
        $this -> AddButton($b);
    }
    
    function submit()
    {
        // constants
        Module :: define("setsOnPage", $this -> get("setsOnPage"));
        Module :: define("id", $this -> get("id"));
        
        \Cyfy\Message :: set(self :: t(50));
        return true;
    }
}